package com.rams.jhms;

import javax.swing.UIManager;

import com.rams.jhms.gui.MainForm;
import com.rams.jhms.l18n.EnStrings;
import com.rams.jhms.l18n.RuStrings;
import com.rams.jhms.logging.BaseLogger;

public class Application {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		try {
			UIManager.setLookAndFeel("javax.swing.plaf.nimbus.NimbusLookAndFeel");
			//UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
		} catch (Exception e) {
			BaseLogger.error(e);
		}
		Config.load();
		loadLocal();
		(new MainForm()).setVisible(true);
	}
	
	public static void loadLocal() {
		// TODO: load configuration from user properties
		String local = "ru";
		if (local.equals("ru")) {
			Config.local = new RuStrings();
			return;
		}
		Config.local = new EnStrings();
	}
}
